Use waypt_new in geo.c and then override the alt.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 26 Jan 2007 15:43:37 +0000 (15:43 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 26 Jan 2007 15:43:37 +0000 (15:43 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@2634 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/geo.c

index c19706a96cbe99761b27bd5364e7d84ede658acd..9dbd84c9be20c7ecc871fe5475ed629430864aa2 100644 (file)
@@ -68,8 +68,14 @@ xg_tag_mapping loc_map[] = {
 
 void wpt_s(const char *args, const char **unused) 
 { 
-//     wpt_tmp = waypt_new();
-       wpt_tmp = xcalloc(sizeof(*wpt_tmp), 1);
+       wpt_tmp = waypt_new();
+       /*
+        * 'geo' doesn't really have an 'unknown' and doesn't have any
+        * concept of alt.  Unfortunately, we have many reference files
+        * that have leaked the 'unknown_alt' value into them, so we paper
+        * over that here.
+        */
+       wpt_tmp->altitude = 0;
 }
 
 void wpt_e(const char *args, const char **unused)